﻿
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RecursoSeleccionPanel.ascx.cs" 
Inherits="UILGestion.ObraAdmin.EstructuraCompras.RecursoSeleccionPanel" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc2" %>
<input id="bitSameEstructura" type="hidden" runat="server" />


           <asp:UpdatePanel ID="seleccionUpdatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
           
               <asp:Panel ID="Panel1" runat="server" CssClass="Heading secTitle AreaHeading ms-crm-List-Header " >
               <h2 style="color: #960818">SELECCION RECURSOS DEL PRESUPUESTO</H2>
                </asp:Panel>

               <asp:Panel ID="Panel2" runat="server"  class="ms-crm-Form-Body" Height="350px" >
                 <input id="idEstructuraCostoPartir" type="hidden"  runat="server" />
                 <input id="idObra" type="hidden"  runat="server" />
                 
                               <input id="idRecursoPartirList" type="hidden"  runat="server" />
                               <input id="idNivelBusqueda" type="hidden"  runat="server" />
                               <input id="idEstructuraCosto" type="hidden"  runat="server" />
                               <input id="simbolMoneda" type="hidden"  runat="server" />
                               

      <table width="100%">
                <tr>
                <td valign="top">

               <asp:Panel runat="server" ID="Panel4" BackColor="White" GroupingText="Busqueda" BorderColor="LightBlue" BorderWidth="1">

                   <table  >
              
              
                    <tr>
                    <td align="right">
                        Presupuesto:</td>
                    <td  >
                        
                        <cc2:DropDownCC ID="presupuestoDropDownList" runat="server" Width="100%"   
                            AutoPostBack="true" onselectedindexchanged="presupuestoDropDownList_SelectedIndexChanged"     
                             
                             
                           ></cc2:DropDownCC>
                    </td> 
                    
                   
                </tr>

               <tr>
                <td align="right" >                
                    <asp:Label ID="grupoRecursoLBL" runat="server" Text="Grupo:"></asp:Label>
                    </td>
                    <td  >
                       <asp:UpdatePanel runat="server" ID="gruposUPNL" UpdateMode="Conditional">
                       <ContentTemplate>
                        <cc2:DropDownCC ID="recursogrupoDropDownList" runat="server" Width="100%" />
                       </ContentTemplate>
                       <Triggers>
                       <asp:AsyncPostBackTrigger ControlID="presupuestoDropDownList" />
                       </Triggers>
                       </asp:UpdatePanel>
                       
                    </td> 
                   
                    </tr>
                       <tr>
                           <td>
                               &nbsp;</td>
                           <td>
                               <asp:Button ID="Button3" runat="server" CssClass="ms-crm-List-Header" 
                                   onclick="Button3_Click" Text="Buscar" Width="100px" />
                           </td>
                       </tr>
            </table>
            </asp:Panel>

             </td>
                <td align="right" valign="top">
                <asp:Panel runat="server" ID="avanzadoPNL" BackColor="White" GroupingText="Busqueda Avanzada" BorderColor="LightBlue" BorderWidth="1">
                <table width="100%">
                <tr>
                <td >
                    <asp:Label ID="tipoBusquedaLBL" runat="server" Text="Tipo:"></asp:Label>
                    </td>
                <td align="left"> 

                    <cc2:DropDownCC ID="campoDropDownList" runat="server"  
                             Width="130px"></cc2:DropDownCC>
                    
                       </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                <td>Valor:</td>
                <td align="left">
                    <cc2:PostTextBox ID="ValorTextBox" runat="server"  
                             Width="130px" CssClass="text"></cc2:PostTextBox>
                       
                            </td>
                    <td>
                        <asp:Button ID="Button5" runat="server" CssClass="ms-crm-List-Header" 
                         onclick="Button5_Click" Text="Buscar Avanzado" />
                    </td>
                </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td align="left">
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
                </asp:Panel>
                </td>

                <td>
                    <asp:UpdatePanel ID="totalUpdatePanel" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                    
                <table class="PanelTotales">
                <tr align="right">
                <td>Total  Soles:</td>
                <td align="right" width="120px">
                    <asp:Label ID="totalSolesLbl" runat="server" Text="0.00"></asp:Label></td>
                </tr>
                <tr>
                <td align="right">Total Dolares:</td>
                <td align="right" width="120px">
                    <asp:Label ID="totalDolaresLbl" runat="server" Text="0.00"></asp:Label></td>
                </tr>
                </table>
                </ContentTemplate>
                    </asp:UpdatePanel>
                </td>

                </tr>
                </table>          
        <asp:Panel ID="Panel3" runat="server" Height="310px" ScrollBars="Vertical" BackColor="White" 
                       BorderColor="LightSteelBlue" BorderStyle="Solid" BorderWidth="1px"   >
               <asp:UpdatePanel ID="grillaUpdatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                 
       <asp:GridView ID="itemGridView" 
       Runat="Server" 
       SkinID="GridView" 
       DataKeyNames="idInternal" 
        AllowSorting="true" 
            OnSorting="SortingItem"
       >
                  <Columns>
    
    <asp:TemplateField ItemStyle-Width="1%">
                            <ItemTemplate >
                                <asp:CheckBox runat="server" ID="chkEmployeeSelector"  ClientIDMode="Static" 
                                 OnCheckedChanged="ItemSelectChange" AutoPostBack="true"/>
                            </ItemTemplate>
                            <HeaderTemplate>
                                <asp:CheckBox runat="server" ID="chkSelectAll" ClientIDMode="Static" 
                                 OnCheckedChanged="ItemAllSelectChange" AutoPostBack="true"/>
                            </HeaderTemplate>
                        </asp:TemplateField>

                        <asp:BoundField DataField="desPresupuesto" HeaderText="PRESUP."  SortExpression="desPresupuesto"  HeaderStyle-Width="35px" />
                        <asp:BoundField DataField="codPartida" HeaderText="COD PART." SortExpression="codPartida"  HeaderStyle-Width="25px" />
                        <asp:BoundField DataField="desPartida" HeaderText="PARTIDA"   SortExpression="desPartida"  HeaderStyle-Width="250px" />
                        <asp:BoundField DataField="codigo" HeaderText="CODIGO"   SortExpression="codigo"  HeaderStyle-Width="35px" />
                        <asp:BoundField DataField="descripcion" HeaderText="DESCRIPCION"  SortExpression="descripcion" HeaderStyle-Width="300px"/>
                        <asp:BoundField DataField="unidad" HeaderText="UNID." SortExpression="unidad" HeaderStyle-Width="35px" />
                        <asp:BoundField DataField="cantidadStr" HeaderText="CANT."  SortExpression="cantidad" ItemStyle-Width="95px" ItemStyle-HorizontalAlign="Right" />
                        <asp:BoundField DataField="precioStr" HeaderText="PRECIO"  SortExpression="precio" ItemStyle-Width="95px"  ItemStyle-HorizontalAlign="Right" />
                        <asp:BoundField DataField="parcialStr" HeaderText="PARCIAL" SortExpression="parcial"  ItemStyle-Width="95px"  ItemStyle-HorizontalAlign="Right" />
                        <asp:BoundField DataField="saldoStr" HeaderText="SALDO" SortExpression="saldo"  ItemStyle-BackColor="LightGoldenrodYellow" ItemStyle-Width="95px"  ItemStyle-HorizontalAlign="Right" />
                
                  </Columns>
                  </asp:GridView>


                  </ContentTemplate></asp:UpdatePanel>
         </asp:Panel>  
</asp:Panel>
 
               
            </ContentTemplate>
           
            </asp:UpdatePanel>
   